package com.mpgame.core.effect;

import com.fasterxml.jackson.databind.JsonNode;
import com.mpgame.core.model.Damage;
import com.mpgame.core.model.Monster;
import com.mpgame.core.utils.MReport;

public class DamageEffect extends Effect{
    private Damage damage;
    @Override
    protected void innerParseJson(JsonNode params){
        Damage dmg = Damage.parseFromJson(params.get("damage"));
        this.damage = dmg;
    }
    @Override
    protected void take(Monster target){
        target.takeHurt(this.damage);
        MReport.Report(target.getIdentifier() + "的技能 " + target.getCurSkill().getIdentifier() + " 的特殊效果造成额外伤害生效了！");
    }
}
